package com.yuyou.hxyy.service.api.mapper;

import com.yuyou.hxyy.service.api.bean.Pagination;
import com.yuyou.hxyy.service.api.entity.WordRepo;
import com.yuyou.hxyy.service.api.vo.resp.WordRepoStatisticsVo;
import com.yuyou.hxyy.service.api.vo.resp.WordRepoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface WordRepoMapper {
    int deleteByPrimaryKey(Long wordRepoId);

    int insert(WordRepo record);

    WordRepo selectByPrimaryKey(Long wordRepoId);

    int updateByPrimaryKeySelective(WordRepo record);

    int findWordRepoCount(Pagination<WordRepoVo> queryPgn);

    List<WordRepoVo> findWordRepoPage(Pagination<WordRepoVo> queryPgn);

    List<WordRepoVo> findAllWordRepo(Map<String , Object> condition);

    Integer getMaxSort(@Param(value = "category") Integer category);

    void deleteByIds(@Param(value = "ids") String ids);

    WordRepo findByNameCategory(@Param(value = "name") String name ,@Param(value = "category") Integer category);

    int batchInsertWordRepo(List<WordRepo> wordRepoList);

    List<WordRepoStatisticsVo> getWordRepoList();

    WordRepo getLatestRepo(@Param(value = "userId") Long userId);

    List<Long> findRepoIdsByUnitIds(@Param(value = "utilIds") String utilIds);
}